package com.eastfair.projectcore.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.eastfair.core.base.entity.SuperEntity;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * DB 雪花id的 WorkerID
 * </p>
 *
 * @author ligang
 * @since 2022-02-25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "WorkerNodeUpdateDTO", description = "DB 雪花id的 WorkerID")
public class WorkerNodeUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotNull(message = "请填写主键", groups = SuperEntity.Update.class)
    private Long id;

    /**
     * 主机名
     */
    @ApiModelProperty(value = "主机名")
    @NotEmpty(message = "请填写主机名")
    @Size(max = 64, message = "主机名长度不能超过64")
    private String hostName;
    /**
     * 端口
     */
    @ApiModelProperty(value = "端口")
    @NotEmpty(message = "请填写端口")
    @Size(max = 64, message = "端口长度不能超过64")
    private String port;
}
